﻿@model RefundmentApply 
@Html.HiddenFor(m => m.Status)
@Html.HiddenFor(m => m.BankDataId)
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.CustomerCode, DisplayOptions.Auto)
    </div>
    <div class="editor-field">
        @Html.TextBoxReadOnlyFor(model => model.CustomerCode)
        @Html.ValidationMessageFor(model => model.CustomerCode)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(s => s.CustomerName, DisplayOptions.Auto)
    </div>
    <div class="editor-field">
        @if (Model != null && Model.CustomerName.IsNotNullOrWhiteSpace() 
            && ViewData["CodeIsNotConfirm"] == null)
        { 
            @Html.TextBoxReadOnlyFor(model => model.CustomerName)
        }
        else
        {
            @Html.TextSearch(m => m.CustomerName, "getCustomer()")
        }
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.OrderNum, DisplayOptions.Auto)
    </div>
    <div class="editor-field">
        @if (Model.Status > 0)
        {
            @Html.TextBoxReadOnlyFor(model => model.OrderNum)
        }
        else
        { 
            @Html.TextBoxFor(model => model.OrderNum)
        }
        @Html.ValidationMessageFor(model => model.OrderNum)
    </div>
</div>
<div class="layout-twocolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.RefundmentReason, DisplayOptions.Auto)
    </div>
    <div class="editor-field">@Html.EditorFor(model => model.RefundmentReason)
        @Html.ValidationMessageFor(model => model.RefundmentReason)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.Amount)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(model => model.Amount)
        @Html.ValidationMessageFor(model => model.Amount)
    </div>
</div>
@if (Model.Status == 1)
{
    <div class="layout-onecolumn">
        <div class="editor-label">
            @Html.LabelFor(model => model.Status)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(s => s.Status, BindDropDownList.GetApprovaStates())
            @Html.ValidationMessageFor(model => model.Status)
        </div>
    </div>
        
    <div class="layout-onecolumn">
        <div class="editor-label">
            @Html.LabelFor(model => model.ApplyTime)
        </div>
        <div class="editor-field">
            @Html.TextBoxReadOnlyFor(model => model.ApplyTime)
            @Html.ValidationMessageFor(model => model.ApplyTime)
        </div>
    </div>
}
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.BankPerson)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.BankPerson)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.BankProvince)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.BankProvince)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.BankCity)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.BankCity)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.BankName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.BankName)
        @Html.ValidationMessageFor(model => model.BankName)
    </div>
</div>
<div class="layout-onecolumn">
    <div class="editor-label">
        @Html.LabelFor(model => model.BankAccount)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.BankAccount)
    </div>
</div>
